package tgc.edu.yzy.repository;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import tgc.edu.yzy.custom.CommonRepository;
import tgc.edu.yzy.entity.Teacher;
@Repository
public interface TeacherRepository extends CommonRepository<Teacher, Integer>{

	public Teacher findByTcuserAndTcpassword(String username, String password);
	@Modifying
	@Query(value="update Teacher t set t.tcpassword=?1 WHERE t.id=?2")
	public void updatePassword(String password, Integer id);
	
	public Teacher findByTcuser(String tbuser);
	

	
}
